<template>
  <div id="updateDialog">
    <el-dialog class="box" :title="this.title" :visible.sync="updateDialogShow" :before-close="handleClose">
        <div class="content" v-if="this.showStatus=== '1'">
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">出厂编号：{{this.queryEquipInfo.equip_cid}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">创建时间：{{this.queryEquipInfo.produce_date}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">状态：{{this.queryEquipInfo.status_label}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">名称：{{this.queryEquipInfo.name_label}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">品牌：{{this.queryEquipInfo.brand_label}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">类型：{{this.queryEquipInfo.type_label}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">型号：{{this.queryEquipInfo.model}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">操作方式：{{this.queryEquipInfo.operation_mode_label}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">结构形式：{{this.queryEquipInfo.structure}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">跨度：{{this.queryEquipInfo.span}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">工作级别：{{this.queryEquipInfo.work_level_label}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">大车轨道长度：{{this.queryEquipInfo.big_car_track_length}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">轨道型号：{{this.queryEquipInfo.big_car_track_model}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">起升高度：{{this.queryEquipInfo.lifting_height}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">额定功率(kW)：{{this.queryEquipInfo.whole_rated_power}}</div></el-col>
            </el-row>
          </div>
          <div class="first" v-for="itemval in this.queryEquipInfo.lifting_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">主起升机构1#功率(kW)：{{itemval.power}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">主起升机构1#电流：{{itemval.current}}</div></el-col>
            </el-row>
          </div>
          <div class="two" v-for="itemval1 in this.queryEquipInfo.lifting_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">主起升1#额定重量(t)：{{itemval1.weight}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">主起升1#速度(m/min)：{{itemval1.speed}}</div></el-col>
            </el-row>
          </div>
          <div class="first" v-for="valer in this.queryEquipInfo.small_car_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">小车机构1#功率(kW)：{{valer.power}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">小车机构1#电流(A)：{{valer.current}}</div></el-col>
            </el-row>
          </div>
          <div class="two" v-for="valer1 in this.queryEquipInfo.small_car_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">小车1#运行速度(m/min)：{{valer1.speed}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="first" v-for="valer2 in this.queryEquipInfo.big_car_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">大车机构额定功率(kW)：22(kW)：{{valer2.power}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">大车机构电流(A)：{{valer2.current}}</div></el-col>
            </el-row>
          </div>
          <div class="two" v-for="valer3 in this.queryEquipInfo.big_car_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">大车运行速度(m/min)：{{valer3.speed}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">使用范围：{{this.queryEquipInfo.range}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">制造商：{{this.queryEquipInfo.manufacturer}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">出厂日期：{{this.queryEquipInfo.produce_date}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">行业类别：{{this.queryEquipInfo.industry_type_label}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">保修期(月)：{{this.queryEquipInfo.defects_liability_period}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">所属项目：{{this.queryEquipInfo.project}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">交付(取证)时间：{{this.queryEquipInfo.delivery_time}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">客户名称：{{this.queryEquipInfo.customer_name}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">厂内编号：{{this.queryEquipInfo.produce_number}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">设备价格(万)：{{this.queryEquipInfo.equip_price}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">使用登记证编号：{{this.queryEquipInfo.register_number}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">安装位置：{{this.queryEquipInfo.install_position}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">下次年审时间：{{this.queryEquipInfo.next_annual_trial}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">服务商信息：{{this.queryEquipInfo.service_provider}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">所属车间：{{this.queryEquipInfo.workshop}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">负责人信息：{{this.queryEquipInfo.equip_person_liable}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="firstimg">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12">
                <div class="grid-content bg-purple">设备图片：    <img width="150px" :src="picture"></div></el-col>
            </el-row>
          </div>
          <div class="twodesc">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="24"><div class="grid-content bg-purple">备注：{{this.queryEquipInfo.remark}}</div></el-col>
            </el-row>
          </div>


        </div>
        <div slot="footer" class="dialog-footer" v-if="this.showStatus=== '1'">
          <el-button type="danger" @click="showUpdate" >编辑</el-button>
          <el-button type="warning" @click="handleClose" >关闭</el-button>
        </div>
        <div class="content" v-if="this.showStatus=== '2'">
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">出厂编号：{{this.queryEquipInfo.equip_cid}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">创建时间：{{this.queryEquipInfo.produce_date}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">状态：{{this.queryEquipInfo.status_label}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">名称：{{this.queryEquipInfo.name_label}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">品牌：{{this.queryEquipInfo.brand_label}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">类型：{{this.queryEquipInfo.type_label}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">型号：{{this.queryEquipInfo.model}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">操作方式：{{this.queryEquipInfo.operation_mode_label}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">结构形式：{{this.queryEquipInfo.structure}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">跨度：{{this.queryEquipInfo.span}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">工作级别：{{this.queryEquipInfo.work_level_label}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">大车轨道长度：{{this.queryEquipInfo.big_car_track_length}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">轨道型号：{{this.queryEquipInfo.big_car_track_model}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">起升高度：{{this.queryEquipInfo.lifting_height}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">额定功率(kW)：{{this.queryEquipInfo.whole_rated_power}}</div></el-col>
            </el-row>
          </div>
          <div class="first" v-for="itemval in this.queryEquipInfo.lifting_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">主起升机构1#功率(kW)：{{itemval.power}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">主起升机构1#电流：{{itemval.current}}</div></el-col>
            </el-row>
          </div>
          <div class="two" v-for="itemval1 in this.queryEquipInfo.lifting_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">主起升1#额定重量(t)：{{itemval1.weight}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">主起升1#速度(m/min)：{{itemval1.speed}}</div></el-col>
            </el-row>
          </div>
          <div class="first" v-for="valer in this.queryEquipInfo.small_car_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">小车机构1#功率(kW)：{{valer.power}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">小车机构1#电流(A)：{{valer.current}}</div></el-col>
            </el-row>
          </div>
          <div class="two" v-for="valer1 in this.queryEquipInfo.small_car_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">小车1#运行速度(m/min)：{{valer1.speed}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="first" v-for="valer2 in this.queryEquipInfo.big_car_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">大车机构额定功率(kW)：22(kW)：{{valer2.power}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">大车机构电流(A)：{{valer2.current}}</div></el-col>
            </el-row>
          </div>
          <div class="two" v-for="valer3 in this.queryEquipInfo.big_car_rated">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">大车运行速度(m/min)：{{valer3.speed}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">使用范围：{{this.queryEquipInfo.range}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">制造商：{{this.queryEquipInfo.manufacturer}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">出厂日期：{{this.queryEquipInfo.produce_date}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">行业类别：{{this.queryEquipInfo.industry_type}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">保修期(月)：{{this.queryEquipInfo.defects_liability_period}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">所属项目：{{this.queryEquipInfo.project}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">交付(取证)时间：{{this.queryEquipInfo.delivery_time}}</div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">客户名称：{{this.queryEquipInfo.customer_name}}</div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12">
                <div class="grid-content bg-purple" >
                  厂内编号：
                  <input  placeholder="" v-model="queryEquipInfo.produce_number"><span style="color: #fff">*</span>
                </div>
              </el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">设备价格(万)：{{this.queryEquipInfo.equip_price}}</div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple" style="color: #666">

                使用登记证编号：<input  placeholder="" style="width: 325px; margin-left: 24px" v-model="queryEquipInfo.register_number"></div></el-col>
              <!--<el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light">投产时间：</div></el-col>-->
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12">
                <div class="grid-content bg-purple" style="color: #666">安装位置：
                  <input  placeholder="" style="width: 325px; margin-left: 66px" v-model="queryEquipInfo.install_position">
                </div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12">
                <!--{{this.queryEquipInfo.next_annual_trial}}-->
                <div class="grid-content bg-purple-light">下次年审时间：<span style="color: #fff">*</span>
                  <el-date-picker
                    v-model="value"
                    type="date"
                    placeholder="选择日期"
                    format="yyyy-MM-dd"
                    value-format="yyyy-MM-dd"
                    color="#666">
                  </el-date-picker>
                </div></el-col>
            </el-row>
          </div>
          <div class="first">
            <el-row :gutter="10" style="color: #666">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">服务商信息：                <input  placeholder="" style="width: 325px; margin-left: 52px" v-model="queryEquipInfo.service_provider">
              </div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12" style="color: #666"><div class="grid-content bg-purple-light">所属车间：<input  placeholder="" style="width: 325px; margin-left: 38px" v-model="queryEquipInfo.workshop"></div></el-col>
            </el-row>
          </div>
          <div class="two">
            <el-row :gutter="10" style="color: #666">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12"><div class="grid-content bg-purple">负责人信息：<input  placeholder="" style="width: 325px; margin-left: 52px" v-model="queryEquipInfo.equip_person_liable"></div></el-col>
              <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="12"><div class="grid-content bg-purple-light"></div></el-col>
            </el-row>
          </div>
          <div class="firstimg">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="12">
                <div class="grid-content bg-purple">设备图片：    <img width="150px" :src="picture"></div></el-col>
            </el-row>
          </div>
          <div class="twodesc">
            <el-row :gutter="10">
              <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="24"><div class="grid-content bg-purple">备注：{{this.queryEquipInfo.remark}}</div></el-col>
            </el-row>
          </div>


        </div>
        <div slot="footer" class="dialog-footer" v-if="this.showStatus=== '2'">
          <el-button type="danger" @click="saveUpdateData">保存</el-button>
          <el-button type="warning" @click="handleClose" >取消</el-button>
      </div>

    </el-dialog>
  </div>
</template>

<script>
  import axios from 'axios'
  export default {
    props: {
      pInfoCid: {}
    },
    components: {
    },
    data() {
      return {
        restatus: '更新',
        options: [],
        updateDialogFalse: false,
        updateEquipDialog: false,
        // 图片显示
        picture: '',
        submitEquip: {
          access_token: window.localStorage.getItem('access_token'),
          type: 'equip_get_byid',
          id: '123'
        },
        queryEquipInfo: {},
        showStatus: '1',
        title: '设备详情',
        value: '',
        // 修改接口
        redactequipdata: {
          access_token: window.localStorage.getItem('access_token'),
          type: 'equip_mod',
          data: {}
        }
      }
    },
    mounted() {
      this.getViewEquip()
      this.showDetail()
    },
    created() {
      this.updateDialogShow = true
    },
    methods: {
      // 显示设备详情
      showDetail() {
        this.showStatus = '1'
      },
      showUpdate() {
        this.showStatus = '2'
        this.title = '设备编辑'
      },
      // 获取设备信息
      getViewEquip() {
        this.submitEquip.id = this.pInfoCid
        axios.post('./equipmanage', this.submitEquip, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.queryEquipInfo = res.data.data
          if (res.data.data.attachment.length === 0) {
            var showpicture = axios.defaults.baseURL + '///'
          } else {
            var path = res.data.data.attachment[0].path
            showpicture = axios.defaults.baseURL + '/' + path
          }
          this.picture = showpicture
          this.seachTitle = this.queryEquipInfo.install_position
          this.value = this.queryEquipInfo.next_annual_trial
          this.seachContent = res.data.data.equip_cid + '+' + res.data.data.equip_class + '+' + res.data.data.produce_number
        })
      },
      // 修改接口
      saveUpdateData() {
        this.queryEquipInfo.next_annual_trial = this.value
        this.redactequipdata.data = this.queryEquipInfo
        axios.post('/equipmanage', this.redactequipdata, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          console.log(res)

          if (res.data.errcode === '00000') {
            this.handleClose()
          } else {
            alert(res.data.errmsg)
          }
        }).catch((error) => {
          console.log(error)
        })
      },
      // 从新组装label 和 value
      formArr(arr) {
        var newarr = []
        for (let i = 0; i < arr.length; i++) {
          var obj = {}
          var def = arr[i]
          obj['label'] = def['label']
          obj['value'] = def['value']
          obj['raw_label'] = def['raw_label']
          obj['raw_value'] = def['raw_value']
          obj['begin'] = def['begin']
          obj['end'] = def['end']
          newarr.push(obj)
        }
        return newarr
      },
      // 子组件传值
      handleClose() {
        const dialogShow = this.updateDialogFalse // 所需要传的值
        this.$emit('giveFalse', dialogShow) // 传值的参数
      },
      // 保存成功返回测点列表
      restar() {
        this.$emit('rerule', this.restatus)
      },
      showupdateEquipDialog() {
        this.updateEquipDialog = !this.updateEquipDialog
      },
      closeequipulMask(val) {
        this.updateEquipDialog = val
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  /*****************第一层弹窗*****************/
  .content{
    width: 960px;
    min-height: 700px;
    margin-top: 10px;
    margin-left: 10px;
    input{
      border-radius: 4px;
      border: 1px solid #E5E5E5;
      height: 27px;
      width: 326px;
      position: absolute;
      z-index: 10;
      margin-left: 60px;
      padding-left: 10px;
    }
    .firstimg{
      width: 800px;
      min-height: 30px;
      img{
        vertical-align: middle;
      }
    }
    .first{
      font-size:14px;
      font-family:MicrosoftYaHei;
      font-weight:400;
      color:rgba(51,51,51,1);
      line-height:30px;
      .el-col {
        border-radius: 4px;
      }
      .bg-purple-dark {
        background: #fff;
      }
      .bg-purple {
        background: #fff;
      }
      .bg-purple-light {
        background: #fff;
      }
      .grid-content {
        border-radius: 4px;
        height: 30px;
      }
    }
    .twodesc{
      width: 100%;
      min-height: 30px;
    }
    .two{
      font-size:14px;
      font-family:MicrosoftYaHei;
      font-weight:400;
      color:rgba(51,51,51,1);
      line-height:30px;
      /deep/ .el-input__inner {
        height: 28px;
        width: 325px;
      }
      /deep/ .el-input__icon {
        height: 100%;
        width: 25px;
        text-align: center;
        -webkit-transition: all .3s;
        transition: all .3s;
        line-height: 30px;
      }
      .el-col {
        border-radius: 4px;
      }
      .bg-purple-dark {
        background: #F7F8F9;
      }
      .bg-purple {
        background: #F7F8F9;
      }
      .bg-purple-light {
        background: #F7F8F9;
      }
      .grid-content {
        height: 30px;
      }
    }

  }
  .rightLine{
    font-size: 16px;
    color: #25B6C7;
    font-weight: bold;
    cursor: pointer;
  }
  .tableIcon{
    i{
      font-size: 22px;
    }
  }
  /deep/ .addEditIcon {
    color: #25B7C8;
    font-size: 16px;
    cursor: pointer;
  }
  /deep/ .el-range-editor--small.el-input__inner {
    height: 30px;
    width: 385px;
  }
  /deep/ .addSafeTable > .el-table__header-wrapper{
    height: 0px;
  }
  /*****************第一层弹窗*****************/
  /deep/ .box > .el-dialog{
    width: 1010px;
    height: 700px;
    overflow: auto;
    margin-top: 20vh !important;
    border-radius: 4px;
  }
  /*****************第一层弹窗头部*****************/
  /deep/ .box > .el-dialog > .el-dialog__header{
    width: 1010px;
    height: 39px;
    line-height: 43px;
    padding: 0;
    text-indent: 20px;
    font-weight: bolder;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: #EFEFEF;
  }
  /deep/ .box > .el-dialog > .el-dialog__header > .el-dialog__headerbtn{
    top: 12px;
  }
  /deep/ .box > .el-dialog > .el-dialog__header > .el-dialog__headerbtn > i{
    font-size: 18px;
    font-weight: bolder;
  }
  /*****************第一层弹窗内容*****************/
  /deep/ .box > .el-dialog > .el-dialog__body{
    padding: 1px 0 0 10px ;
    line-height: 30px;
    height: 590px;
    overflow: auto;
    margin-bottom: 20px;
  }
  /*****************第一层弹窗底部*****************/
  /deep/ .box > .el-dialog > .el-dialog__footer{
    border-top: 1px solid #e3e6ee;
  }
  /*****************底部按钮*****************/
 /deep/ .el-dialog__footer {
    padding: 10px 20px 10px 0px;
    text-align: right;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
  /deep/ .dialog-footer > .el-button{
    width: 80px;
    height: 30px;
    padding: 0;
  }
  /deep/ .el-input__inner {
    -webkit-appearance: none;
    background-color: #fff;
    background-image: none;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #606266;
    display: inline-block;
    font-size: inherit;
    height: 30px;
    line-height: 30px;
    outline: 0;
    padding: 0 27px;
    -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    width: 100%;
  }
  /deep/ .el-icon-minus {
    color: #D05133;
  }
  #updateDialog /deep/ .el-table tr {
    background-color: #F0F3F5;
  }
  #updateDialog /deep/  .el-table td {
    border-bottom: 10px solid #fff;
  }
  #updateDialog /deep/  .el-table--group::after, .el-table--border::after, .el-table::before {
    content: '';
    position: absolute;
    background-color: #fff;
    z-index: 1;
  }


</style>
